How do generators handle errors? How does .throw() interact with try/catch inside a generator?
Errors in generators can be caught with try/catch inside the generator. generator.throw(error) injects an error at the current yield point, which can be caught by a surrounding try/catch.